package com.springtest.Controller;

import java.io.IOException;
import java.io.UnsupportedEncodingException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.log4j.Logger;
import org.json.JSONArray;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;

import com.springtest.Data.User;

@Controller
@RequestMapping("view/reg/*")
public class RegForm {
	private static Logger logger = Logger.getLogger(RegForm.class);

	@RequestMapping(value = "regist.do*")
	public String addStudent( User User, ModelMap model) {
		model.addAttribute("UserName", User.getUserName());
		model.addAttribute("Sex", User.getSex());
		logger.debug("xxxxxxxxxxxx");
		return "result";
	}

}
